package com.yyl.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yyl.entity.Emp;
import com.yyl.service.IEmpService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 于永利
 * @since 2024-07-18
 */
@RestController
@RequestMapping("/emp")
public class EmpController {

    @Resource
    private IEmpService empService;

    @GetMapping
    public Page findAll(Integer curr,Integer pageSize) {

        Page page = new Page<>(curr,pageSize);
        Page page1 = empService.page(page);
        return page1;
    }
}

